<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/6/14
  Time: 15:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%--退回审核弹窗--%>
<div class="winBox backProcess_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明： 选择已有客户 -->
        <div class="winBox3 ">
            <div class="deleteBox">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">退回审核</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 中间列表 -->
                    <div class="deleteTit">
			<span class="first">
				<i class="iconfont icon-tips2"></i>
			</span>
                        <span>您确定要退回订单!</span>
                    </div>
                    <div class="beizhu"><span>*</span>输入退回原因</div>
                    <textarea class="backRemark"></textarea>
                    <!-- 底部 -->
                    <div class="deleFooter">
                        <div class="deleBtn">
                            <button class="sureBack">确定退回</button>
                            <button class="canBack">取消退回</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%--流程节点表单--%>
<div class="winBox processForm_winBox">
    <div class="winBox1">
        <div class="winBox3">
            <div class="dealrecord">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">角色审批</span>
                    <i class="iconfont icon-wrong headerIcon" id="show"></i>
                </div>


                <div class="resultBox">
                    <div class="centerBox" style="max-height: 600px; overflow-y: auto;">
                        <div class="resultPadd formBox"
                             style="padding: 0px 17px 0 20px;">
                            <table class="resultTab approve" style="margin-top: 20px">
                                <tbody class="role_list">
                                <tr class="esa">
                                    <td><span style="color: #FF0404;">*</span>审核结果：</td>
                                    <td>
                                        <label><input type="radio" name="faceResult" value="1"
                                                      ng-model="param.faceResult"
                                                      class="ng-pristine ng-untouched ng-valid ng-empty">审核通过</label>
                                        <label><input type="radio" name="faceResult" value="2"
                                                      ng-model="param.faceResult"
                                                      class="ng-pristine ng-untouched ng-valid ng-empty">拒绝审核</label>
                                    </td>
                                </tr>

                                <script type="text/x-handlebars-template" id="role_list_tpl">
                                    {{#if admins.[0]}}
                                    <tr class="role">
                                        <td><span style="color: #D5332C;">*</span>请选对象</td>
                                        <td class="tdSelect">
                                            <div class="se-re">
                                                <select id="role_select">
                                                    <option value="">请选择{{role_name}}</option>
                                                    {{#each admins}}
                                                    {{#if realName}}
                                                    <option value="{{id}}">{{realName}}</option>
                                                    {{/if}}
                                                    {{/each }}
                                                </select>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr class="chooseRole" style="display: none;">
                                        <td>已选择：</td>
                                        <td class="tdWei selPers">

                                        </td>
                                    </tr>
                                    {{else}}
                                    <tr class="role">
                                        <td><span style="color: #D5332C;">*</span>请选对象</td>
                                        <td class="tdSelect">
                                            <div class="se-re">
                                                <select id="role_select">
                                                    <option value="">无</option>
                                                    {{#each admins}}
                                                    {{#if realName}}
                                                    <option value="{{id}}">{{realName}}</option>
                                                    {{/if}}
                                                    {{/each }}
                                                </select>
                                                当前无审批人员，请联系管理员进行创建！
                                            </div>
                                        </td>
                                    </tr>
                                    {{/if}}
                                </script>
                                </tbody>
                            </table>
                            <div class="deleFooter">
                                <div class="beizhu assBeizhu"><span>*</span>审核备注</div>
                                <textarea class="approveRemark"></textarea>
                                <div class="deleBtn">
                                    <button style="background: #E55A5B;" id="roamTask">确定提交</button>
                                </div>
                                <%--<div class="zishu">
                                    <span id="zishuxians">200</span>字
                                </div>--%>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 内容角色下拉框 -->
            </div>
        </div>
    </div>
</div>

<%--订单委托弹框--%>

<div class="winBox delegate_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明： 选择已有客户 -->
        <div class="winBox6 ">
            <div class="being">
                <div class="headerBox">
                    <span class="headerSpan">选择委托人</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="location.reload();"></i>
                </div>
                <div class="contentBox">
                    <div class="centerBox" style="height: 470px;">
                        <div class="beInput">
                            <input type="text" autocomplete="off" placeholder="输入委托人姓名" ng-model="data.keyword"
                                   id="choice"
                                   class="ng-pristine ng-untouched ng-valid ng-empty">
                            <button ng-click="sel('search')" class="showPerson">
                                <i class="iconfont icon-sousuo"></i>
                            </button>
                        </div>
                        <table class="table table-hover tabBe">
                            <thead>
                            <tr>
                                <td>选择</td>
                                <td>委托人姓名</td>
                                <td>用户名</td>
                                <td>部门</td>
                            </tr>
                            </thead>
                            <tbody class="delegate_role_list"></tbody>
                            <script type="text/x-handlebars-template" id="delegate_role_list_tpl">
                                {{#if list.[0]}}
                                {{#each list}}
                                <tr ng-repeat="i in dataList.list" class="">
                                    <td>
                                        <input style="margin-top: 14px" type="radio" id="checkbox_896" name="896"
                                               value="{{adminId}}"
                                               pid="{{pid}}"
                                               class="ng-pristine ng-untouched ng-valid ng-empty">
                                    </td>
                                    <td class="">{{real_name}}</td>
                                    <td>{{username}}</td>
                                    <td>{{d_name}}</td>
                                </tr>
                                {{/each}}
                                {{else}}
                                <tr>
                                    <td colspan="12">暂时找不到数据</td>
                                </tr>
                                {{/if}}
                            </script>
                        </table>
                    </div>
                    <div class="footerBox" style="padding: 15px; display: block;">
                        <div class="footerBtn">
                            <button id="delegate">确定所选</button>
                        </div>
                        <div class="footerRight">
                            <div class="page-container delegate-role-page-container"
                                 style="float: right; padding: 15px 0;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/x-handlebars-template" id="form_list_tpl">
    {{#if attTypeInfos}}
    <table class="resultTab attachment" style="margin-top: 20px">
        <tbody>
        <!-- ngRepeat: (key,item) in AttaSele track by $index -->
        {{#each attTypeInfos}}
        <tr ng-repeat="(key,item) in AttaSele track by $index" class="">
            <td class="">{{type_name}}：</td>
            <td class="unload" style="height: auto">
                <em id="imgTerm_0" class="viewPic" data-id="{{attchment_type_id}}"
                    data-attachname="{{type_name}}">上传文件</em>
                <div class="imgArr minImg" style="margin-bottom: 0px; height: auto">
                    <%--左箭头--%>
                    <span style="display: none;" class="_pre " ng-if="item.isImg" ng-click="_pre(key)"></span>
                    <div class="cover" style="overflow: hidden; margin: 0 24px;{{#if real_data.[0]}}{{else}}display: none;{{/if}}">
                        <div id="gallery{{attchment_type_id}}" attachId="{{attchment_type_id}}"
                             attachname="{{type_name}}"
                             style="position: relative; left: 0;">
                            {{#each real_data}}
                            <li href="{{this}}"><img class="img_00" url="{{this}}" src="{{this}}/tupian_compress">
                                <i class="delSingleAttach iconfont icon-minus">
                                </i>
                            </li>
                            {{/each}}
                            <%--右箭头--%>
                        </div>
                    </div>
                    <span style="display: none;" class="_next " ng-if="item.isImg" ng-click="_next(key)"></span>
                        <span style="display: none" class="file_pre" ng-if="item.isImg" ng-click="_pre(key)"></span>
                        <div class="fileCover" style="overflow: hidden; margin: 0 24px; margin-top: 5px; display: none;">
                            <div id="fileGallery{{attchment_type_id}}" fileAttachId="{{attchment_type_id}}"
                                 attachname="{{type_name}}"
                                 style="position: relative; left: 0;">
                                {{#each real_data}}
                                <li href="{{this}}"><img class="img_00" url="{{this}}" src="{{this}}/tupian_compress">
                                    <i class="delSingleFileAttach iconfont icon-minus">
                                    </i>
                                </li>
                                {{/each}}
                                <%--右箭头--%>
                            </div>
                        </div>
                        <span style="display: none" class="file_next " ng-if="item.isImg" ng-click="_next(key)"></span>
                </div>
            </td>
        </tr><!-- end ngRepeat: (key,item) in AttaSele track by $index -->
        {{/each}}
        </tbody>
    </table>
    {{/if}}
    <%--自定义字段的渲染--%>
    {{#if productInfos}}
    <table class="productInfos resultTab" style="margin-top: 20px">
        <tbody>
        {{#each productInfos}}
        {{#if define_type}}
        <%--如果固定字段类型是form_name不显示--%>
        {{#IF_NEQ define_type 'form_name'}}
        <tr class="esa">
            <td class="">
                {{#IF_EQ required '1'}}
                <span style="color:red">*</span>
                {{/IF_EQ}}
                {{name}}
            </td>

            <%--如果可编辑--%>
            {{#IF_EQ is_edit 1}}

            <%--文本框类型--%>
            {{#IF_EQ define_type 'text'}}
            <td class="tdWei tdRadio" name="{{name}}" require="{{required}}"
                property_id="{{define_id}}"
                style="background: #ffffff;">
                <label>
                    <input style="width: 148px" type="text" autocomplete="off" productForm="text"
                           class="ng-pristine ng-untouched ng-valid ng-empty"
                           value="{{real_data}}">
                </label>
            </td>
            {{/IF_EQ}}

            <%--下拉菜单控件类型--%>
            {{#IF_EQ define_type 'select'}}
            <td class="tdSelect" name="{{name}}" property_id="{{define_id}}"
                require="{{required}}"
                style="background: #ffffff;">
                <div class="se-re">
                    <select productForm="select"
                            class="ng-pristine ng-valid ng-not-empty ng-touched">
                        <option>请选择</option>
                        {{#each contentInfos}}
                        {{#each ../real_data}}
                        {{#IF_EQ ../id content_id}}
                        <option value="{{../../id}}" selected>{{../../content}}</option>
                        {{else}}
                        <option value="{{../../id}}">{{../../content}}</option>
                        {{/IF_EQ}}
                        {{/each}}
                        {{/each}}
                    </select>
                    <span class="se-po" style="right: 4px"></span>
                </div>
            </td>
            {{/IF_EQ}}

            <%--单选框类型--%>
            {{#IF_EQ define_type 'radio'}}
            <td style="background: #ffffff;" name="{{name}}" require="{{required}}"
                property_id="{{define_id}}">
                {{#if real_data}}
                {{#each contentInfos}}
                {{#each ../real_data}}
                {{#IF_EQ ../id content_id}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{../../../name}}"
                                                         value="{{../../id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty" checked>&nbsp;&nbsp;{{../../content}}</label>
                {{else}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{../../../name}}"
                                                         value="{{../../id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty">&nbsp;&nbsp;{{../../content}}</label>
                {{/IF_EQ}}
                {{/each}}
                {{/each}}
                {{else}}
                {{#each contentInfos}}
                <label style="margin-right: 5px;"><input type="radio" productForm="radio" name="{{name}}"
                                                         value="{{id}}"
                                                         ng-model="param.faceResult"
                                                         class="ng-pristine ng-untouched ng-valid ng-empty">&nbsp;&nbsp;{{content}}</label>
                {{/each}}
                {{/if}}
            </td>
            {{/IF_EQ}}

            <%--文本框类型--%>
            {{#IF_EQ define_type 'textarea'}}
            <td class="tdSelect" style="background: #ffffff;" name="{{name}}"
                property_id="{{define_id}}"
                require="{{required}}">
                <textarea productForm="textarea">{{real_data}}</textarea>
            </td>
            {{/IF_EQ}}
            {{#IF_EQ define_type 'checkbox'}}
            <td style="background: #ffffff;" name="{{name}}" property_id="{{define_id}}"
                require="{{required}}">
                {{#each contentInfos}}
                <label><input type="checkbox" productForm="checkbox" name="{{name}}"
                              value="{{id}}"
                              ng-model="param.faceResult"
                              class="ng-pristine ng-untouched ng-valid ng-empty"
                              {{#each ../real_data}}
                    {{#IF_EQ ../id content_id}}
                    checked
                    {{/IF_EQ}}
                    {{/each}}
                    >{{content}}</label>
                {{/each}}
            </td>
            {{/IF_EQ}}
            {{/IF_EQ}}

            <%--如果不可编辑则显示真实数据--%>
            {{#IF_EQ is_edit 2}}
            {{#if real_data}}
            <%--文本框类型--%>
            {{#IF_EQ define_type 'text'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">{{real_data}}</td>
            {{/IF_EQ}}

            <%--下拉菜单类型--%>
            {{#IF_EQ define_type 'select'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>

            {{/IF_EQ}}

            <%--单选框--%>
            {{#IF_EQ define_type 'radio'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>
            {{/IF_EQ}}

            <%--复选框--%>
            {{#IF_EQ define_type 'checkbox'}}
            <td>
                {{#each real_data}}
                {{content}}
                {{/each}}
            </td>
            {{/IF_EQ}}

            <%--文本框--%>
            {{#IF_EQ define_type 'textarea'}}
            <td>{{real_data}}</td>
            {{/IF_EQ}}
            {{else}}
            <td>未填写</td>
            {{/if}}
            {{/IF_EQ}}
        </tr>
        {{/IF_NEQ}}
        {{/if}}
        {{/each}}
        </tbody>
    </table>
    {{/if}}

    <%--固定字段的渲染--%>
    {{#if orderInfos}}
    <table class="resultTab fix" style="margin-top:20px ;">
        <tbody>
        {{#if feeInfos}}
        <tr>
            <td><span style="color:red">*</span>扣费明细</td>

            <td class="tdWei inst-detail">
                {{#each feeInfos}}
                {{#IF_EQ is_edit 1}}
                <span>
					 				<span>{{name}} :</span>
					 				<label class="slabel"><input fee_id="{{define_id}}" name="{{name}}" require="1"
                                                                 ng-focus="remHight()" type="text" autocomplete="off"
                                                                 ng-model="param.interest"
                                                                 class="ng-pristine ng-valid ng-not-empty ng-touched"
                                                                 value="{{real_data}}">
                                    {{#IF_EQ define_type '1'}}
					 					<span>元</span>
                                        {{else}}
                                        <span>分</span>
                                    {{/IF_EQ}}
                                    </label>
                                        </span>
                {{else}}
                <span>
                                                <span>{{name}}:</span>
                                                {{#if real_data}}
                                                {{real_data}}
                                                {{#IF_EQ define_type '1'}}
					 					        <span>元</span>
                                                {{else}}
                                                <span>分</span>
                                                {{/IF_EQ}}
                                                {{else}}
                                                <span>未填写</span>
                                                {{/if}}
                                                </span>


                {{/IF_EQ}}
                {{/each}}
            </td>
        </tr>
        {{/if}}
        {{#each orderInfos}}
        <tr>
            <td {{#IF_EQ fixed_key 'at_id'}}class="applyTrem"{{/IF_EQ}}>{{#IF_NEQ fixed_key 'os_id'}}<span style="color:red">*</span>{{/IF_NEQ}}{{fixed_name}}
            </td>

            <%--{{#IF_EQ is_edit 1}}--%>
            <%--还款方式--%>
            {{#IF_EQ fixed_key 'repayment_way'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="repanymentWay_content" require="1" name='还款方式'
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">
                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            <%--申请金额--%>
            {{#IF_EQ fixed_key 'apply_money'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">
                <label><input type="text" autocomplete="off" require="1" id="apply_money" name="申请金额"
                              column_key="{{fixed_key}}"
                              class="ng-pristine ng-untouched ng-valid ng-empty"/>元
                </label>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'os_id'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="orderSource_content" require="0" name="订单来源"
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">

                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'at_id'}}
            <td class="tdSelect applyTrem">
                <div class="se-re">
                    <select id="applyTerm_content" name="申请期限" require="1"
                            column_key="{{fixed_key}}"
                            class="ng-pristine ng-valid ng-empty ng-touched">

                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'lt_id'}}
            <td class="tdSelect">
                <div class="se-re">
                    <select id="loanType_content" require="1" name="贷款类型"
                            column_key="{{fixed_key}}">
                    </select>
                    <span class="se-po se-box"></span>
                </div>
            </td>
            {{/IF_EQ}}

            {{#IF_EQ fixed_key 'loan_way'}}
            <td>
                <div class="controls" id="loanMethod_content" require="1" name="贷款方式"
                     column_key="{{fixed_key}}">
                </div>
            </td>
            {{/IF_EQ}}

            <%--申请金额--%>
            {{#IF_EQ fixed_key 'interest'}}
            <td class="tdWei tdRadio" style="background: #ffffff;">
                <label><input type="text" autocomplete="off" require="1" id="interest" name="利率"
                              column_key="{{fixed_key}}" value="{{real_data}}"
                              class="ng-pristine ng-untouched ng-valid ng-empty"/>分
                </label>
            </td>
            {{/IF_EQ}}
            <%--{{/IF_EQ}}--%>
            <%--{{#IF_EQ is_edit 2}}
            <td>{{real_data}}</td>
            {{/IF_EQ}}--%>
        </tr>
        {{/each}}
        </tbody>
    </table>
    {{/if}}
</script>

<%--<script type="text/x-handlebars-template" id="role_list_tpl">
    <div style="color: #666; font-weight: 600;">
        <span>{{role_name}}</span>
    </div>
    <div class="se-re public-bgDate">
        <select id="role_select">
            <option value="" selected>请选择</option>
            {{#each admins}}
            {{#if realName}}
            <option value="{{id}}">{{realName}}</option>
            {{/if}}
            {{/each }}
        </select>
    </div>
</script>--%>

<%--节点表单渲染的下拉框选项--%>
<script type="text/x-handlebars-template" id="loanType_content_tpl">
    <option>请选择</option>
    {{#each .}}
    <option data-id="{{id}}" {{#IF_EQ id ../real_data}}selected{{/IF_EQ}}>{{ltName}}</option>
    {{/each}}
</script>

<script type="text/x-handlebars-template" id="repanymentWay_content_tpl">
    <option>请选择</option>
    {{#each .}}
    <option data-id="{{id}}">{{re_name}}</option>
    {{/each}}
</script>

<script type="text/x-handlebars-template" id="applyTerm_content_tpl">
    <option>请选择</option>
    {{#each .}}
    <option data-id="{{id}}" data-num="{{num}}">{{atName}}</option>
    {{/each}}
</script>

<script type="text/x-handlebars-template" id="orderSource_content_tpl">
    <option>请选择</option>
    {{#each .}}
    <option data-id="{{id}}">{{osName}}</option>
    {{/each}}
</script>

<script type="text/x-handlebars-template" id="loanMethod_content_tpl">
    {{#each .}}
    <label style="margin-right: 5px;"><input type="radio" name="loanMethod" value="{{loan_method_id}}" style="width: 15px">&nbsp;&nbsp;{{name}}</label>
    {{/each}}
</script>


